<?php

class Guidance_Form_Guidance extends Sfs_Form
{
    public  $guidanceSelect = array('parent_relation','family_kind','family_air',
    'discipline_father','discipline_mother','live_state','asset_state');
    public   $optionArray = array(
        'favorite_scopes' => 'scopes',
        'difficult_scpoes' => 'scopes',
        'particular_ability' => 'particular_ability',
        'interest' => 'interest',
        'living_habit'=>'living_habit',
        'relationship'=>'relationship',
        'behavior_extrovert'=>'behavior_extrovert',
        'behavior_introvert' => 'behavior_introvert',
        'behavior_learning' => 'behavior_learning',
        'bad_manner' => 'bad_manner',
        'behavior_anxiety' =>'behavior_anxiety'
        );

    public function init()
    {
        $systemText = new Default_Model_SystemText();

        $this->addElement('select', 'parent_relation', array(
            'label' => 'parent_relation',
            'filters'    => array('StringTrim','StripTags'),
            'multiOptions'=> $systemText->getKindArray('relation',Default_Model_SystemText::HAS_EMPTY_OPTION),
        ));
        $this->addElement('select', 'family_kind', array(
            'label' => 'family_kind',
            'filters'    => array('StringTrim','StripTags'),
            'multiOptions'=> $systemText->getKindArray('family_kind',Default_Model_SystemText::HAS_EMPTY_OPTION),
        ));
        $this->addElement('select', 'family_air', array(
            'label' => 'family_air',
            'filters'    => array('StringTrim','StripTags'),
            'multiOptions'=> $systemText->getKindArray('family_air',Default_Model_SystemText::HAS_EMPTY_OPTION),
        ));
        $this->addElement('select', 'discipline_father', array(
            'label' => 'discipline_father',
            'filters'    => array('StringTrim','StripTags'),
            'multiOptions'=> $systemText->getKindArray('discipline_father',Default_Model_SystemText::HAS_EMPTY_OPTION),
        ));
        $this->addElement('select', 'discipline_mother', array(
            'label' => 'discipline_mother',
            'filters'    => array('StringTrim','StripTags'),
            'multiOptions'=> $systemText->getKindArray('discipline_father',Default_Model_SystemText::HAS_EMPTY_OPTION),
        ));
        $this->addElement('select', 'live_state', array(
            'label' => 'live_state',
            'filters'    => array('StringTrim','StripTags'),
            'multiOptions'=> $systemText->getKindArray('live_state',Default_Model_SystemText::HAS_EMPTY_OPTION),
        ));
        $this->addElement('select', 'asset_state', array(
            'label' => 'asset_state',
            'filters'    => array('StringTrim','StripTags'),
            'multiOptions'=> $systemText->getKindArray('asset_state',Default_Model_SystemText::HAS_EMPTY_OPTION),
        ));



        foreach ($this->optionArray as $k=>$v) {
            $tempArr = array();
            $arr = $systemText->getKindArray($v);
            foreach ($arr as $key=>$val) {
                $this->addElement('checkbox',$k."_".$key, array(
            'label' => $val,
            'filters'    => array('StringTrim','StripTags'),
                'decorators' => $this->standardElementDecorator,
                ));
                $tempArr[] = $k."_".$key;
            }
            $this->addDisplayGroup($tempArr,$k, array(
            'legend' => $k,
            )
            );
        }


}


}

